﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class admin_MasterPageAdmin : System.Web.UI.MasterPage
{
    public string username = "";
    public string menu = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        // 未登录跳转
        if (Session["username"] == null)
        {
            Response.Redirect("index.html");
        }
        username = Session["username"].ToString();

        // 1 管理员  2 编辑 3 普通用户 
        if (Session["limit"].ToString() == "1")
        {
            menu = "<li><a href=\"movie.aspx\">电影管理</a></li>"+
                "<li><a href=\"type.aspx\">分类管理</a></li>"+
                "<li><a href=\"slider.aspx\">轮播图管理</a></li>" +
                "<li><a href=\"user.aspx\">用户管理</a></li>" +
                "<li><a href=\"personal.aspx\">个人设置</a></li>";
        }

        if (Session["limit"].ToString() == "2")
        {
            menu = "<li><a href=\"movie.aspx\">电影管理</a></li>" +
                   "<li><a href=\"type.aspx\">分类管理</a></li>" +
                   "<li><a href=\"personal.aspx\">个人设置</a></li>";

        }

        if (Session["limit"].ToString() == "3")
        {
            menu = "<li><a href=\"../index.aspx\">网站首页</a></li>" +
            "<li><a href=\"personal.aspx\">个人设置</a></li>";

        }
    }
}
